using System;
using System.Collections.Generic;
using System.Text;
using Sedna.Core.Controller;
using Sedna.Core.Controller.Common;

namespace Sedna.Core.pages.Actions
{
    public class SetModeAction : AbstractAction
    {
        private String exceptionCodePath;

        public string ExceptionCodePath
        {
            set { exceptionCodePath = value; }
        }

        public override IActionResult Execute(IExecutionContext executionContext)
        {
            scopePathParser.Parse("ec['changePasswordMode']").Value = false;
            scopePathParser.Parse("ec['loginMode']").Value = true;
            executionContext.SetPropertyValue(exceptionCodePath, 0);
            scopePathParser.Parse("ec['errorlabel2.visible']").Value = false;
            return CreateResult(successStatus);
        }

    }
}
